home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / docshell / nsIDocShell.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  48KB  |  977 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIDocShell.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIDocShell_h__
  6. #define __gen_nsIDocShell_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsPresContext;
  18. class nsIPresShell;
  19. class nsIURI; /* forward declaration */
  20.  
  21. class nsIContentViewer; /* forward declaration */
  22.  
  23. class nsIURIContentListener; /* forward declaration */
  24.  
  25. class nsIChromeEventHandler; /* forward declaration */
  26.  
  27. class nsIDocShellLoadInfo; /* forward declaration */
  28.  
  29. class nsIDocumentCharsetInfo; /* forward declaration */
  30.  
  31. class nsIWebNavigation; /* forward declaration */
  32.  
  33. class nsISimpleEnumerator; /* forward declaration */
  34.  
  35. class nsIInputStream; /* forward declaration */
  36.  
  37. class nsIRequest; /* forward declaration */
  38.  
  39. class nsISHEntry; /* forward declaration */
  40.  
  41. class nsILayoutHistoryState; /* forward declaration */
  42.  
  43. class nsISecureBrowserUI; /* forward declaration */
  44.  
  45.  
  46. /* starting interface:    nsIDocShell */
  47. #define NS_IDOCSHELL_IID_STR "9f0c7461-b9a4-47f6-b88c-421dce1bce66"
  48.  
  49. #define NS_IDOCSHELL_IID \
  50.   {0x9f0c7461, 0xb9a4, 0x47f6, \
  51.     { 0xb8, 0x8c, 0x42, 0x1d, 0xce, 0x1b, 0xce, 0x66 }}
  52.  
  53. class NS_NO_VTABLE nsIDocShell : public nsISupports {
  54.  public: 
  55.  
  56.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOCSHELL_IID)
  57.  
  58.   /**
  59.    * Loads a given URI.  This will give priority to loading the requested URI
  60.    * in the object implementing    this interface.  If it can't be loaded here
  61.    * however, the URL dispatcher will go through its normal process of content
  62.    * loading.
  63.    *
  64.    * @param uri        - The URI to load.
  65.    * @param loadInfo   - This is the extended load info for this load.  This
  66.    *                     most often will be null, but if you need to do 
  67.    *                     additional setup for this load you can get a loadInfo
  68.    *                     object by calling createLoadInfo.  Once you have this
  69.    *                     object you can set the needed properties on it and
  70.    *                     then pass it to loadURI.
  71.    * @param aLoadFlags - Flags to modify load behaviour. Flags are defined
  72.    *                     in nsIWebNavigation.
  73.    */
  74.   /* [noscript] void loadURI (in nsIURI uri, in nsIDocShellLoadInfo loadInfo, in unsigned long aLoadFlags, in boolean firstParty); */
  75.   NS_IMETHOD LoadURI(nsIURI *uri, nsIDocShellLoadInfo *loadInfo, PRUint32 aLoadFlags, PRBool firstParty) = 0;
  76.  
  77.   /**
  78.    * Loads a given stream. This will give priority to loading the requested
  79.    * stream in the object implementing this interface. If it can't be loaded
  80.    * here however, the URL dispatched will go through its normal process of
  81.    * content loading.
  82.    *
  83.    * @param aStream         - The input stream that provides access to the data
  84.    *                          to be loaded.  This must be a blocking, threadsafe
  85.    *                          stream implementation.
  86.    * @param aURI            - The URI representing the stream, or null.
  87.    * @param aContentType    - The type (MIME) of data being loaded (empty if unknown).
  88.    * @param aContentCharset - The charset of the data being loaded (empty if unknown).
  89.    * @param aLoadInfo       - This is the extended load info for this load.  This
  90.    *                          most often will be null, but if you need to do 
  91.    *                          additional setup for this load you can get a
  92.    *                          loadInfo object by calling createLoadInfo.  Once
  93.    *                          you have this object you can set the needed 
  94.    *                          properties on it and then pass it to loadStream.
  95.    */
  96.   /* [noscript] void loadStream (in nsIInputStream aStream, in nsIURI aURI, in ACString aContentType, in ACString aContentCharset, in nsIDocShellLoadInfo aLoadInfo); */
  97.   NS_IMETHOD LoadStream(nsIInputStream *aStream, nsIURI *aURI, const nsACString & aContentType, const nsACString & aContentCharset, nsIDocShellLoadInfo *aLoadInfo) = 0;
  98.  
  99.   enum { INTERNAL_LOAD_FLAGS_NONE = 0 };
  100.  
  101.   enum { INTERNAL_LOAD_FLAGS_INHERIT_OWNER = 1 };
  102.  
  103.   enum { INTERNAL_LOAD_FLAGS_DONT_SEND_REFERRER = 2 };
  104.  
  105.   /**
  106.    * Loads the given URI.  This method is identical to loadURI(...) except
  107.    * that its parameter list is broken out instead of being packaged inside
  108.    * of an nsIDocShellLoadInfo object...
  109.    *
  110.    * @param aURI            - The URI to load.
  111.    * @param aReferrer       - Referring URI
  112.    * @param aOwner          - Owner (security principal) 
  113.    * @param aInheritOwner   - Flag indicating whether the owner of the current
  114.    *                          document should be inherited if aOwner is null.
  115.    * @param aStopActiveDoc  - Flag indicating whether loading the current
  116.    *                          document should be stopped.
  117.    * @param aWindowTarget   - Window target for the load.
  118.    * @param aTypeHint       - A hint as to the content-type of the resulting
  119.    *                          data.  May be null or empty if no hint.
  120.    * @param aPostDataStream - Post data stream (if POSTing)
  121.    * @param aHeadersStream  - Stream containing "extra" request headers...
  122.    * @param aLoadFlags      - Flags to modify load behaviour. Flags are defined
  123.    *                          in nsIWebNavigation.
  124.    * @param aSHEntry        - Active Session History entry (if loading from SH)
  125.    */
  126.   /* [noscript] void internalLoad (in nsIURI aURI, in nsIURI aReferrer, in nsISupports aOwner, in PRUint32 aFlags, in wstring aWindowTarget, in string aTypeHint, in nsIInputStream aPostDataStream, in nsIInputStream aHeadersStream, in unsigned long aLoadFlags, in nsISHEntry aSHEntry, in boolean firstParty, out nsIDocShell aDocShell, out nsIRequest aRequest); */
  127.   NS_IMETHOD InternalLoad(nsIURI *aURI, nsIURI *aReferrer, nsISupports *aOwner, PRUint32 aFlags, const PRUnichar *aWindowTarget, const char *aTypeHint, nsIInputStream *aPostDataStream, nsIInputStream *aHeadersStream, PRUint32 aLoadFlags, nsISHEntry *aSHEntry, PRBool firstParty, nsIDocShell **aDocShell, nsIRequest **aRequest) = 0;
  128.  
  129.   /**
  130.    * Creates a DocShellLoadInfo object that you can manipulate and then pass
  131.    * to loadURI.
  132.    */
  133.   /* void createLoadInfo (out nsIDocShellLoadInfo loadInfo); */
  134.   NS_IMETHOD CreateLoadInfo(nsIDocShellLoadInfo **loadInfo) = 0;
  135.  
  136.   /**
  137.    * Reset state to a new content model within the current document and the document
  138.    * viewer.  Called by the document before initiating an out of band document.write().
  139.    */
  140.   /* void prepareForNewContentModel (); */
  141.   NS_IMETHOD PrepareForNewContentModel(void) = 0;
  142.  
  143.   /**
  144.    * For editors and suchlike who wish to change the URI associated with the
  145.    * document. Note if you want to get the current URI, use the read-only
  146.    * property on nsIWebNavigation.
  147.    */
  148.   /* void setCurrentURI (in nsIURI aURI); */
  149.   NS_IMETHOD SetCurrentURI(nsIURI *aURI) = 0;
  150.  
  151.   /**
  152.    * Notify the associated content viewer and all child docshells that they are
  153.    * about to be hidden.  If |isUnload| is true, then the document is being
  154.    * unloaded as well.
  155.    */
  156.   /* [noscript] void firePageHideNotification (in boolean isUnload); */
  157.   NS_IMETHOD FirePageHideNotification(PRBool isUnload) = 0;
  158.  
  159.   /**
  160.    * Presentation context for the currently loaded document.  This may be null.
  161.    */
  162.   /* [noscript] readonly attribute nsPresContext presContext; */
  163.   NS_IMETHOD GetPresContext(nsPresContext * *aPresContext) = 0;
  164.  
  165.   /**
  166.    * Presentation shell for the currently loaded document.  This may be null.
  167.    */
  168.   /* [noscript] readonly attribute nsIPresShell presShell; */
  169.   NS_IMETHOD GetPresShell(nsIPresShell * *aPresShell) = 0;
  170.  
  171.   /**
  172.    * Presentation shell for the oldest document, if this docshell is
  173.    * currently transitioning between documents.
  174.    */
  175.   /* [noscript] readonly attribute nsIPresShell eldestPresShell; */
  176.   NS_IMETHOD GetEldestPresShell(nsIPresShell * *aEldestPresShell) = 0;
  177.  
  178.   /**
  179.    * Content Viewer that is currently loaded for this DocShell.  This may
  180.    * change as the underlying content changes.
  181.    */
  182.   /* readonly attribute nsIContentViewer contentViewer; */
  183.   NS_IMETHOD GetContentViewer(nsIContentViewer * *aContentViewer) = 0;
  184.  
  185.   /**
  186.    * This attribute allows chrome to tie in to handle DOM events that may
  187.    * be of interest to chrome.
  188.    */
  189.   /* attribute nsIChromeEventHandler chromeEventHandler; */
  190.   NS_IMETHOD GetChromeEventHandler(nsIChromeEventHandler * *aChromeEventHandler) = 0;
  191.   NS_IMETHOD SetChromeEventHandler(nsIChromeEventHandler * aChromeEventHandler) = 0;
  192.  
  193.   /**
  194.    * The document charset info.  This is used by a load to determine priorities
  195.    * for charset detection etc.
  196.    */
  197.   /* attribute nsIDocumentCharsetInfo documentCharsetInfo; */
  198.   NS_IMETHOD GetDocumentCharsetInfo(nsIDocumentCharsetInfo * *aDocumentCharsetInfo) = 0;
  199.   NS_IMETHOD SetDocumentCharsetInfo(nsIDocumentCharsetInfo * aDocumentCharsetInfo) = 0;
  200.  
  201.   /**
  202.    * Whether to allow plugin execution
  203.    */
  204.   /* attribute boolean allowPlugins; */
  205.   NS_IMETHOD GetAllowPlugins(PRBool *aAllowPlugins) = 0;
  206.   NS_IMETHOD SetAllowPlugins(PRBool aAllowPlugins) = 0;
  207.  
  208.   /**
  209.    * Whether to allow Javascript execution
  210.    */
  211.   /* attribute boolean allowJavascript; */
  212.   NS_IMETHOD GetAllowJavascript(PRBool *aAllowJavascript) = 0;
  213.   NS_IMETHOD SetAllowJavascript(PRBool aAllowJavascript) = 0;
  214.  
  215.   /**
  216.    * Attribute stating if refresh based redirects can be allowed
  217.    */
  218.   /* attribute boolean allowMetaRedirects; */
  219.   NS_IMETHOD GetAllowMetaRedirects(PRBool *aAllowMetaRedirects) = 0;
  220.   NS_IMETHOD SetAllowMetaRedirects(PRBool aAllowMetaRedirects) = 0;
  221.  
  222.   /**
  223.    * Attribute stating if it should allow subframes (framesets/iframes) or not
  224.    */
  225.   /* attribute boolean allowSubframes; */
  226.   NS_IMETHOD GetAllowSubframes(PRBool *aAllowSubframes) = 0;
  227.   NS_IMETHOD SetAllowSubframes(PRBool aAllowSubframes) = 0;
  228.  
  229.   /**
  230.    * Attribute stating whether or not images should be loaded.
  231.    */
  232.   /* attribute boolean allowImages; */
  233.   NS_IMETHOD GetAllowImages(PRBool *aAllowImages) = 0;
  234.   NS_IMETHOD SetAllowImages(PRBool aAllowImages) = 0;
  235.  
  236.   /**
  237.    * Get an enumerator over this docShell and its children.
  238.    *
  239.    * @param aItemType  - Only include docShells of this type, or if typeAll,
  240.    *                     include all child shells.
  241.    *                     Uses types from nsIDocShellTreeItem.
  242.    * @param aDirection - Whether to enumerate forwards or backwards.
  243.    */
  244.   enum { ENUMERATE_FORWARDS = 0 };
  245.  
  246.   enum { ENUMERATE_BACKWARDS = 1 };
  247.  
  248.   /* nsISimpleEnumerator getDocShellEnumerator (in long aItemType, in long aDirection); */
  249.   NS_IMETHOD GetDocShellEnumerator(PRInt32 aItemType, PRInt32 aDirection, nsISimpleEnumerator **_retval) = 0;
  250.  
  251.   /**
  252.    * The type of application that created this window
  253.    */
  254.   enum { APP_TYPE_UNKNOWN = 0U };
  255.  
  256.   enum { APP_TYPE_MAIL = 1U };
  257.  
  258.   enum { APP_TYPE_EDITOR = 2U };
  259.  
  260.   /* attribute unsigned long appType; */
  261.   NS_IMETHOD GetAppType(PRUint32 *aAppType) = 0;
  262.   NS_IMETHOD SetAppType(PRUint32 aAppType) = 0;
  263.  
  264.   /**
  265.    * certain dochshells (like the message pane)
  266.    * should not throw up auth dialogs
  267.    * because it can act as a password trojan
  268.    */
  269.   /* attribute boolean allowAuth; */
  270.   NS_IMETHOD GetAllowAuth(PRBool *aAllowAuth) = 0;
  271.   NS_IMETHOD SetAllowAuth(PRBool aAllowAuth) = 0;
  272.  
  273.   /**
  274.    * Set/Get the document scale factor.  When setting this attribute, a
  275.    * NS_ERROR_NOT_IMPLEMENTED error may be returned by implementations
  276.    * not supporting zoom.  Implementations not supporting zoom should return
  277.    * 1.0 all the time for the Get operation.  1.0 by the way is the default
  278.    * of zoom.  This means 100% of normal scaling or in other words normal size
  279.    * no zoom. 
  280.    */
  281.   /* attribute float zoom; */
  282.   NS_IMETHOD GetZoom(float *aZoom) = 0;
  283.   NS_IMETHOD SetZoom(float aZoom) = 0;
  284.  
  285.   /* attribute long marginWidth; */
  286.   NS_IMETHOD GetMarginWidth(PRInt32 *aMarginWidth) = 0;
  287.   NS_IMETHOD SetMarginWidth(PRInt32 aMarginWidth) = 0;
  288.  
  289.   /* attribute long marginHeight; */
  290.   NS_IMETHOD GetMarginHeight(PRInt32 *aMarginHeight) = 0;
  291.   NS_IMETHOD SetMarginHeight(PRInt32 aMarginHeight) = 0;
  292.  
  293.   /* attribute boolean hasFocus; */
  294.   NS_IMETHOD GetHasFocus(PRBool *aHasFocus) = 0;
  295.   NS_IMETHOD SetHasFocus(PRBool aHasFocus) = 0;
  296.  
  297.   /* attribute boolean canvasHasFocus; */
  298.   NS_IMETHOD GetCanvasHasFocus(PRBool *aCanvasHasFocus) = 0;
  299.   NS_IMETHOD SetCanvasHasFocus(PRBool aCanvasHasFocus) = 0;
  300.  
  301.   /* void tabToTreeOwner (in boolean forward, out boolean tookFocus); */
  302.   NS_IMETHOD TabToTreeOwner(PRBool forward, PRBool *tookFocus) = 0;
  303.  
  304.   /**
  305.    * Current busy state for DocShell
  306.    */
  307.   enum { BUSY_FLAGS_NONE = 0U };
  308.  
  309.   enum { BUSY_FLAGS_BUSY = 1U };
  310.  
  311.   enum { BUSY_FLAGS_BEFORE_PAGE_LOAD = 2U };
  312.  
  313.   enum { BUSY_FLAGS_PAGE_LOADING = 4U };
  314.  
  315.   /**
  316.    * Load commands for the document 
  317.    */
  318.   enum { LOAD_CMD_NORMAL = 1U };
  319.  
  320.   enum { LOAD_CMD_RELOAD = 2U };
  321.  
  322.   enum { LOAD_CMD_HISTORY = 4U };
  323.  
  324.   /* readonly attribute unsigned long busyFlags; */
  325.   NS_IMETHOD GetBusyFlags(PRUint32 *aBusyFlags) = 0;
  326.  
  327.   /* attribute unsigned long loadType; */
  328.   NS_IMETHOD GetLoadType(PRUint32 *aLoadType) = 0;
  329.   NS_IMETHOD SetLoadType(PRUint32 aLoadType) = 0;
  330.  
  331.   /* boolean isBeingDestroyed (); */
  332.   NS_IMETHOD IsBeingDestroyed(PRBool *_retval) = 0;
  333.  
  334.   /* readonly attribute boolean isExecutingOnLoadHandler; */
  335.   NS_IMETHOD GetIsExecutingOnLoadHandler(PRBool *aIsExecutingOnLoadHandler) = 0;
  336.  
  337.   /* attribute nsILayoutHistoryState layoutHistoryState; */
  338.   NS_IMETHOD GetLayoutHistoryState(nsILayoutHistoryState * *aLayoutHistoryState) = 0;
  339.   NS_IMETHOD SetLayoutHistoryState(nsILayoutHistoryState * aLayoutHistoryState) = 0;
  340.  
  341.   /* readonly attribute boolean shouldSaveLayoutState; */
  342.   NS_IMETHOD GetShouldSaveLayoutState(PRBool *aShouldSaveLayoutState) = 0;
  343.  
  344.   /**
  345.    * The SecureBrowserUI object for this docshell.  This is set by XUL
  346.    * <browser> or nsWebBrowser for their root docshell.
  347.    */
  348.   /* attribute nsISecureBrowserUI securityUI; */
  349.   NS_IMETHOD GetSecurityUI(nsISecureBrowserUI * *aSecurityUI) = 0;
  350.   NS_IMETHOD SetSecurityUI(nsISecureBrowserUI * aSecurityUI) = 0;
  351.  
  352.   /**
  353.    * Cancel the XPCOM timers for each meta-refresh URI in this docshell,
  354.    * and this docshell's children, recursively. The meta-refresh timers can be
  355.    * restarted using resumeRefreshURIs().  If the timers are already suspended,
  356.    * this has no effect.
  357.    */
  358.   /* void suspendRefreshURIs (); */
  359.   NS_IMETHOD SuspendRefreshURIs(void) = 0;
  360.  
  361.   /**
  362.    * Restart the XPCOM timers for each meta-refresh URI in this docshell,
  363.    * and this docshell's children, recursively.  If the timers are already
  364.    * running, this has no effect.
  365.    */
  366.   /* void resumeRefreshURIs (); */
  367.   NS_IMETHOD ResumeRefreshURIs(void) = 0;
  368.  
  369.   /**
  370.    * Begin firing WebProgressListener notifications for restoring a page
  371.    * presentation. |viewer| is the content viewer whose document we are
  372.    * starting to load.  If null, it defaults to the docshell's current content
  373.    * viewer, creating one if necessary.  |top| should be true for the toplevel
  374.    * docshell that is being restored; it will be set to false when this method
  375.    * is called for child docshells.  This method will post an event to
  376.    * complete the simulated load after returning to the event loop.
  377.    */
  378.   /* void beginRestore (in nsIContentViewer viewer, in boolean top); */
  379.   NS_IMETHOD BeginRestore(nsIContentViewer *viewer, PRBool top) = 0;
  380.  
  381.   /**
  382.    * Finish firing WebProgressListener notifications and DOM events for
  383.    * restoring a page presentation.  This should only be called via
  384.    * beginRestore().
  385.    */
  386.   /* void finishRestore (); */
  387.   NS_IMETHOD FinishRestore(void) = 0;
  388.  
  389.   /* readonly attribute boolean restoringDocument; */
  390.   NS_IMETHOD GetRestoringDocument(PRBool *aRestoringDocument) = 0;
  391.  
  392.   /* attribute boolean useErrorPages; */
  393.   NS_IMETHOD GetUseErrorPages(PRBool *aUseErrorPages) = 0;
  394.   NS_IMETHOD SetUseErrorPages(PRBool aUseErrorPages) = 0;
  395.  
  396.   /**
  397.    * Keeps track of the previous SHTransaction index and the current
  398.    * SHTransaction index at the time that the doc shell begins to load.
  399.    * Used for ContentViewer eviction.
  400.    */
  401.   /* readonly attribute long previousTransIndex; */
  402.   NS_IMETHOD GetPreviousTransIndex(PRInt32 *aPreviousTransIndex) = 0;
  403.  
  404.   /* readonly attribute long loadedTransIndex; */
  405.   NS_IMETHOD GetLoadedTransIndex(PRInt32 *aLoadedTransIndex) = 0;
  406.  
  407.   /**
  408.    * Notification that entries have been removed from the beginning of a
  409.    * nsSHistory which has this as its rootDocShell.
  410.    *
  411.    * @param numEntries - The number of entries removed
  412.    */
  413.   /* void historyPurged (in long numEntries); */
  414.   NS_IMETHOD HistoryPurged(PRInt32 numEntries) = 0;
  415.  
  416. };
  417.  
  418. /* Use this macro when declaring classes that implement this interface. */
  419. #define NS_DECL_NSIDOCSHELL \
  420.   NS_IMETHOD LoadURI(nsIURI *uri, nsIDocShellLoadInfo *loadInfo, PRUint32 aLoadFlags, PRBool firstParty); \
  421.   NS_IMETHOD LoadStream(nsIInputStream *aStream, nsIURI *aURI, const nsACString & aContentType, const nsACString & aContentCharset, nsIDocShellLoadInfo *aLoadInfo); \
  422.   NS_IMETHOD InternalLoad(nsIURI *aURI, nsIURI *aReferrer, nsISupports *aOwner, PRUint32 aFlags, const PRUnichar *aWindowTarget, const char *aTypeHint, nsIInputStream *aPostDataStream, nsIInputStream *aHeadersStream, PRUint32 aLoadFlags, nsISHEntry *aSHEntry, PRBool firstParty, nsIDocShell **aDocShell, nsIRequest **aRequest); \
  423.   NS_IMETHOD CreateLoadInfo(nsIDocShellLoadInfo **loadInfo); \
  424.   NS_IMETHOD PrepareForNewContentModel(void); \
  425.   NS_IMETHOD SetCurrentURI(nsIURI *aURI); \
  426.   NS_IMETHOD FirePageHideNotification(PRBool isUnload); \
  427.   NS_IMETHOD GetPresContext(nsPresContext * *aPresContext); \
  428.   NS_IMETHOD GetPresShell(nsIPresShell * *aPresShell); \
  429.   NS_IMETHOD GetEldestPresShell(nsIPresShell * *aEldestPresShell); \
  430.   NS_IMETHOD GetContentViewer(nsIContentViewer * *aContentViewer); \
  431.   NS_IMETHOD GetChromeEventHandler(nsIChromeEventHandler * *aChromeEventHandler); \
  432.   NS_IMETHOD SetChromeEventHandler(nsIChromeEventHandler * aChromeEventHandler); \
  433.   NS_IMETHOD GetDocumentCharsetInfo(nsIDocumentCharsetInfo * *aDocumentCharsetInfo); \
  434.   NS_IMETHOD SetDocumentCharsetInfo(nsIDocumentCharsetInfo * aDocumentCharsetInfo); \
  435.   NS_IMETHOD GetAllowPlugins(PRBool *aAllowPlugins); \
  436.   NS_IMETHOD SetAllowPlugins(PRBool aAllowPlugins); \
  437.   NS_IMETHOD GetAllowJavascript(PRBool *aAllowJavascript); \
  438.   NS_IMETHOD SetAllowJavascript(PRBool aAllowJavascript); \
  439.   NS_IMETHOD GetAllowMetaRedirects(PRBool *aAllowMetaRedirects); \
  440.   NS_IMETHOD SetAllowMetaRedirects(PRBool aAllowMetaRedirects); \
  441.   NS_IMETHOD GetAllowSubframes(PRBool *aAllowSubframes); \
  442.   NS_IMETHOD SetAllowSubframes(PRBool aAllowSubframes); \
  443.   NS_IMETHOD GetAllowImages(PRBool *aAllowImages); \
  444.   NS_IMETHOD SetAllowImages(PRBool aAllowImages); \
  445.   NS_IMETHOD GetDocShellEnumerator(PRInt32 aItemType, PRInt32 aDirection, nsISimpleEnumerator **_retval); \
  446.   NS_IMETHOD GetAppType(PRUint32 *aAppType); \
  447.   NS_IMETHOD SetAppType(PRUint32 aAppType); \
  448.   NS_IMETHOD GetAllowAuth(PRBool *aAllowAuth); \
  449.   NS_IMETHOD SetAllowAuth(PRBool aAllowAuth); \
  450.   NS_IMETHOD GetZoom(float *aZoom); \
  451.   NS_IMETHOD SetZoom(float aZoom); \
  452.   NS_IMETHOD GetMarginWidth(PRInt32 *aMarginWidth); \
  453.   NS_IMETHOD SetMarginWidth(PRInt32 aMarginWidth); \
  454.   NS_IMETHOD GetMarginHeight(PRInt32 *aMarginHeight); \
  455.   NS_IMETHOD SetMarginHeight(PRInt32 aMarginHeight); \
  456.   NS_IMETHOD GetHasFocus(PRBool *aHasFocus); \
  457.   NS_IMETHOD SetHasFocus(PRBool aHasFocus); \
  458.   NS_IMETHOD GetCanvasHasFocus(PRBool *aCanvasHasFocus); \
  459.   NS_IMETHOD SetCanvasHasFocus(PRBool aCanvasHasFocus); \
  460.   NS_IMETHOD TabToTreeOwner(PRBool forward, PRBool *tookFocus); \
  461.   NS_IMETHOD GetBusyFlags(PRUint32 *aBusyFlags); \
  462.   NS_IMETHOD GetLoadType(PRUint32 *aLoadType); \
  463.   NS_IMETHOD SetLoadType(PRUint32 aLoadType); \
  464.   NS_IMETHOD IsBeingDestroyed(PRBool *_retval); \
  465.   NS_IMETHOD GetIsExecutingOnLoadHandler(PRBool *aIsExecutingOnLoadHandler); \
  466.   NS_IMETHOD GetLayoutHistoryState(nsILayoutHistoryState * *aLayoutHistoryState); \
  467.   NS_IMETHOD SetLayoutHistoryState(nsILayoutHistoryState * aLayoutHistoryState); \
  468.   NS_IMETHOD GetShouldSaveLayoutState(PRBool *aShouldSaveLayoutState); \
  469.   NS_IMETHOD GetSecurityUI(nsISecureBrowserUI * *aSecurityUI); \
  470.   NS_IMETHOD SetSecurityUI(nsISecureBrowserUI * aSecurityUI); \
  471.   NS_IMETHOD SuspendRefreshURIs(void); \
  472.   NS_IMETHOD ResumeRefreshURIs(void); \
  473.   NS_IMETHOD BeginRestore(nsIContentViewer *viewer, PRBool top); \
  474.   NS_IMETHOD FinishRestore(void); \
  475.   NS_IMETHOD GetRestoringDocument(PRBool *aRestoringDocument); \
  476.   NS_IMETHOD GetUseErrorPages(PRBool *aUseErrorPages); \
  477.   NS_IMETHOD SetUseErrorPages(PRBool aUseErrorPages); \
  478.   NS_IMETHOD GetPreviousTransIndex(PRInt32 *aPreviousTransIndex); \
  479.   NS_IMETHOD GetLoadedTransIndex(PRInt32 *aLoadedTransIndex); \
  480.   NS_IMETHOD HistoryPurged(PRInt32 numEntries); 
  481.  
  482. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  483. #define NS_FORWARD_NSIDOCSHELL(_to) \
  484.   NS_IMETHOD LoadURI(nsIURI *uri, nsIDocShellLoadInfo *loadInfo, PRUint32 aLoadFlags, PRBool firstParty) { return _to LoadURI(uri, loadInfo, aLoadFlags, firstParty); } \
  485.   NS_IMETHOD LoadStream(nsIInputStream *aStream, nsIURI *aURI, const nsACString & aContentType, const nsACString & aContentCharset, nsIDocShellLoadInfo *aLoadInfo) { return _to LoadStream(aStream, aURI, aContentType, aContentCharset, aLoadInfo); } \
  486.   NS_IMETHOD InternalLoad(nsIURI *aURI, nsIURI *aReferrer, nsISupports *aOwner, PRUint32 aFlags, const PRUnichar *aWindowTarget, const char *aTypeHint, nsIInputStream *aPostDataStream, nsIInputStream *aHeadersStream, PRUint32 aLoadFlags, nsISHEntry *aSHEntry, PRBool firstParty, nsIDocShell **aDocShell, nsIRequest **aRequest) { return _to InternalLoad(aURI, aReferrer, aOwner, aFlags, aWindowTarget, aTypeHint, aPostDataStream, aHeadersStream, aLoadFlags, aSHEntry, firstParty, aDocShell, aRequest); } \
  487.   NS_IMETHOD CreateLoadInfo(nsIDocShellLoadInfo **loadInfo) { return _to CreateLoadInfo(loadInfo); } \
  488.   NS_IMETHOD PrepareForNewContentModel(void) { return _to PrepareForNewContentModel(); } \
  489.   NS_IMETHOD SetCurrentURI(nsIURI *aURI) { return _to SetCurrentURI(aURI); } \
  490.   NS_IMETHOD FirePageHideNotification(PRBool isUnload) { return _to FirePageHideNotification(isUnload); } \
  491.   NS_IMETHOD GetPresContext(nsPresContext * *aPresContext) { return _to GetPresContext(aPresContext); } \
  492.   NS_IMETHOD GetPresShell(nsIPresShell * *aPresShell) { return _to GetPresShell(aPresShell); } \
  493.   NS_IMETHOD GetEldestPresShell(nsIPresShell * *aEldestPresShell) { return _to GetEldestPresShell(aEldestPresShell); } \
  494.   NS_IMETHOD GetContentViewer(nsIContentViewer * *aContentViewer) { return _to GetContentViewer(aContentViewer); } \
  495.   NS_IMETHOD GetChromeEventHandler(nsIChromeEventHandler * *aChromeEventHandler) { return _to GetChromeEventHandler(aChromeEventHandler); } \
  496.   NS_IMETHOD SetChromeEventHandler(nsIChromeEventHandler * aChromeEventHandler) { return _to SetChromeEventHandler(aChromeEventHandler); } \
  497.   NS_IMETHOD GetDocumentCharsetInfo(nsIDocumentCharsetInfo * *aDocumentCharsetInfo) { return _to GetDocumentCharsetInfo(aDocumentCharsetInfo); } \
  498.   NS_IMETHOD SetDocumentCharsetInfo(nsIDocumentCharsetInfo * aDocumentCharsetInfo) { return _to SetDocumentCharsetInfo(aDocumentCharsetInfo); } \
  499.   NS_IMETHOD GetAllowPlugins(PRBool *aAllowPlugins) { return _to GetAllowPlugins(aAllowPlugins); } \
  500.   NS_IMETHOD SetAllowPlugins(PRBool aAllowPlugins) { return _to SetAllowPlugins(aAllowPlugins); } \
  501.   NS_IMETHOD GetAllowJavascript(PRBool *aAllowJavascript) { return _to GetAllowJavascript(aAllowJavascript); } \
  502.   NS_IMETHOD SetAllowJavascript(PRBool aAllowJavascript) { return _to SetAllowJavascript(aAllowJavascript); } \
  503.   NS_IMETHOD GetAllowMetaRedirects(PRBool *aAllowMetaRedirects) { return _to GetAllowMetaRedirects(aAllowMetaRedirects); } \
  504.   NS_IMETHOD SetAllowMetaRedirects(PRBool aAllowMetaRedirects) { return _to SetAllowMetaRedirects(aAllowMetaRedirects); } \
  505.   NS_IMETHOD GetAllowSubframes(PRBool *aAllowSubframes) { return _to GetAllowSubframes(aAllowSubframes); } \
  506.   NS_IMETHOD SetAllowSubframes(PRBool aAllowSubframes) { return _to SetAllowSubframes(aAllowSubframes); } \
  507.   NS_IMETHOD GetAllowImages(PRBool *aAllowImages) { return _to GetAllowImages(aAllowImages); } \
  508.   NS_IMETHOD SetAllowImages(PRBool aAllowImages) { return _to SetAllowImages(aAllowImages); } \
  509.   NS_IMETHOD GetDocShellEnumerator(PRInt32 aItemType, PRInt32 aDirection, nsISimpleEnumerator **_retval) { return _to GetDocShellEnumerator(aItemType, aDirection, _retval); } \
  510.   NS_IMETHOD GetAppType(PRUint32 *aAppType) { return _to GetAppType(aAppType); } \
  511.   NS_IMETHOD SetAppType(PRUint32 aAppType) { return _to SetAppType(aAppType); } \
  512.   NS_IMETHOD GetAllowAuth(PRBool *aAllowAuth) { return _to GetAllowAuth(aAllowAuth); } \
  513.   NS_IMETHOD SetAllowAuth(PRBool aAllowAuth) { return _to SetAllowAuth(aAllowAuth); } \
  514.   NS_IMETHOD GetZoom(float *aZoom) { return _to GetZoom(aZoom); } \
  515.   NS_IMETHOD SetZoom(float aZoom) { return _to SetZoom(aZoom); } \
  516.   NS_IMETHOD GetMarginWidth(PRInt32 *aMarginWidth) { return _to GetMarginWidth(aMarginWidth); } \
  517.   NS_IMETHOD SetMarginWidth(PRInt32 aMarginWidth) { return _to SetMarginWidth(aMarginWidth); } \
  518.   NS_IMETHOD GetMarginHeight(PRInt32 *aMarginHeight) { return _to GetMarginHeight(aMarginHeight); } \
  519.   NS_IMETHOD SetMarginHeight(PRInt32 aMarginHeight) { return _to SetMarginHeight(aMarginHeight); } \
  520.   NS_IMETHOD GetHasFocus(PRBool *aHasFocus) { return _to GetHasFocus(aHasFocus); } \
  521.   NS_IMETHOD SetHasFocus(PRBool aHasFocus) { return _to SetHasFocus(aHasFocus); } \
  522.   NS_IMETHOD GetCanvasHasFocus(PRBool *aCanvasHasFocus) { return _to GetCanvasHasFocus(aCanvasHasFocus); } \
  523.   NS_IMETHOD SetCanvasHasFocus(PRBool aCanvasHasFocus) { return _to SetCanvasHasFocus(aCanvasHasFocus); } \
  524.   NS_IMETHOD TabToTreeOwner(PRBool forward, PRBool *tookFocus) { return _to TabToTreeOwner(forward, tookFocus); } \
  525.   NS_IMETHOD GetBusyFlags(PRUint32 *aBusyFlags) { return _to GetBusyFlags(aBusyFlags); } \
  526.   NS_IMETHOD GetLoadType(PRUint32 *aLoadType) { return _to GetLoadType(aLoadType); } \
  527.   NS_IMETHOD SetLoadType(PRUint32 aLoadType) { return _to SetLoadType(aLoadType); } \
  528.   NS_IMETHOD IsBeingDestroyed(PRBool *_retval) { return _to IsBeingDestroyed(_retval); } \
  529.   NS_IMETHOD GetIsExecutingOnLoadHandler(PRBool *aIsExecutingOnLoadHandler) { return _to GetIsExecutingOnLoadHandler(aIsExecutingOnLoadHandler); } \
  530.   NS_IMETHOD GetLayoutHistoryState(nsILayoutHistoryState * *aLayoutHistoryState) { return _to GetLayoutHistoryState(aLayoutHistoryState); } \
  531.   NS_IMETHOD SetLayoutHistoryState(nsILayoutHistoryState * aLayoutHistoryState) { return _to SetLayoutHistoryState(aLayoutHistoryState); } \
  532.   NS_IMETHOD GetShouldSaveLayoutState(PRBool *aShouldSaveLayoutState) { return _to GetShouldSaveLayoutState(aShouldSaveLayoutState); } \
  533.   NS_IMETHOD GetSecurityUI(nsISecureBrowserUI * *aSecurityUI) { return _to GetSecurityUI(aSecurityUI); } \
  534.   NS_IMETHOD SetSecurityUI(nsISecureBrowserUI * aSecurityUI) { return _to SetSecurityUI(aSecurityUI); } \
  535.   NS_IMETHOD SuspendRefreshURIs(void) { return _to SuspendRefreshURIs(); } \
  536.   NS_IMETHOD ResumeRefreshURIs(void) { return _to ResumeRefreshURIs(); } \
  537.   NS_IMETHOD BeginRestore(nsIContentViewer *viewer, PRBool top) { return _to BeginRestore(viewer, top); } \
  538.   NS_IMETHOD FinishRestore(void) { return _to FinishRestore(); } \
  539.   NS_IMETHOD GetRestoringDocument(PRBool *aRestoringDocument) { return _to GetRestoringDocument(aRestoringDocument); } \
  540.   NS_IMETHOD GetUseErrorPages(PRBool *aUseErrorPages) { return _to GetUseErrorPages(aUseErrorPages); } \
  541.   NS_IMETHOD SetUseErrorPages(PRBool aUseErrorPages) { return _to SetUseErrorPages(aUseErrorPages); } \
  542.   NS_IMETHOD GetPreviousTransIndex(PRInt32 *aPreviousTransIndex) { return _to GetPreviousTransIndex(aPreviousTransIndex); } \
  543.   NS_IMETHOD GetLoadedTransIndex(PRInt32 *aLoadedTransIndex) { return _to GetLoadedTransIndex(aLoadedTransIndex); } \
  544.   NS_IMETHOD HistoryPurged(PRInt32 numEntries) { return _to HistoryPurged(numEntries); } 
  545.  
  546. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  547. #define NS_FORWARD_SAFE_NSIDOCSHELL(_to) \
  548.   NS_IMETHOD LoadURI(nsIURI *uri, nsIDocShellLoadInfo *loadInfo, PRUint32 aLoadFlags, PRBool firstParty) { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadURI(uri, loadInfo, aLoadFlags, firstParty); } \
  549.   NS_IMETHOD LoadStream(nsIInputStream *aStream, nsIURI *aURI, const nsACString & aContentType, const nsACString & aContentCharset, nsIDocShellLoadInfo *aLoadInfo) { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadStream(aStream, aURI, aContentType, aContentCharset, aLoadInfo); } \
  550.   NS_IMETHOD InternalLoad(nsIURI *aURI, nsIURI *aReferrer, nsISupports *aOwner, PRUint32 aFlags, const PRUnichar *aWindowTarget, const char *aTypeHint, nsIInputStream *aPostDataStream, nsIInputStream *aHeadersStream, PRUint32 aLoadFlags, nsISHEntry *aSHEntry, PRBool firstParty, nsIDocShell **aDocShell, nsIRequest **aRequest) { return !_to ? NS_ERROR_NULL_POINTER : _to->InternalLoad(aURI, aReferrer, aOwner, aFlags, aWindowTarget, aTypeHint, aPostDataStream, aHeadersStream, aLoadFlags, aSHEntry, firstParty, aDocShell, aRequest); } \
  551.   NS_IMETHOD CreateLoadInfo(nsIDocShellLoadInfo **loadInfo) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateLoadInfo(loadInfo); } \
  552.   NS_IMETHOD PrepareForNewContentModel(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->PrepareForNewContentModel(); } \
  553.   NS_IMETHOD SetCurrentURI(nsIURI *aURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCurrentURI(aURI); } \
  554.   NS_IMETHOD FirePageHideNotification(PRBool isUnload) { return !_to ? NS_ERROR_NULL_POINTER : _to->FirePageHideNotification(isUnload); } \
  555.   NS_IMETHOD GetPresContext(nsPresContext * *aPresContext) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPresContext(aPresContext); } \
  556.   NS_IMETHOD GetPresShell(nsIPresShell * *aPresShell) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPresShell(aPresShell); } \
  557.   NS_IMETHOD GetEldestPresShell(nsIPresShell * *aEldestPresShell) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEldestPresShell(aEldestPresShell); } \
  558.   NS_IMETHOD GetContentViewer(nsIContentViewer * *aContentViewer) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContentViewer(aContentViewer); } \
  559.   NS_IMETHOD GetChromeEventHandler(nsIChromeEventHandler * *aChromeEventHandler) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChromeEventHandler(aChromeEventHandler); } \
  560.   NS_IMETHOD SetChromeEventHandler(nsIChromeEventHandler * aChromeEventHandler) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChromeEventHandler(aChromeEventHandler); } \
  561.   NS_IMETHOD GetDocumentCharsetInfo(nsIDocumentCharsetInfo * *aDocumentCharsetInfo) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocumentCharsetInfo(aDocumentCharsetInfo); } \
  562.   NS_IMETHOD SetDocumentCharsetInfo(nsIDocumentCharsetInfo * aDocumentCharsetInfo) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDocumentCharsetInfo(aDocumentCharsetInfo); } \
  563.   NS_IMETHOD GetAllowPlugins(PRBool *aAllowPlugins) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowPlugins(aAllowPlugins); } \
  564.   NS_IMETHOD SetAllowPlugins(PRBool aAllowPlugins) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowPlugins(aAllowPlugins); } \
  565.   NS_IMETHOD GetAllowJavascript(PRBool *aAllowJavascript) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowJavascript(aAllowJavascript); } \
  566.   NS_IMETHOD SetAllowJavascript(PRBool aAllowJavascript) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowJavascript(aAllowJavascript); } \
  567.   NS_IMETHOD GetAllowMetaRedirects(PRBool *aAllowMetaRedirects) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowMetaRedirects(aAllowMetaRedirects); } \
  568.   NS_IMETHOD SetAllowMetaRedirects(PRBool aAllowMetaRedirects) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowMetaRedirects(aAllowMetaRedirects); } \
  569.   NS_IMETHOD GetAllowSubframes(PRBool *aAllowSubframes) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowSubframes(aAllowSubframes); } \
  570.   NS_IMETHOD SetAllowSubframes(PRBool aAllowSubframes) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowSubframes(aAllowSubframes); } \
  571.   NS_IMETHOD GetAllowImages(PRBool *aAllowImages) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowImages(aAllowImages); } \
  572.   NS_IMETHOD SetAllowImages(PRBool aAllowImages) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowImages(aAllowImages); } \
  573.   NS_IMETHOD GetDocShellEnumerator(PRInt32 aItemType, PRInt32 aDirection, nsISimpleEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocShellEnumerator(aItemType, aDirection, _retval); } \
  574.   NS_IMETHOD GetAppType(PRUint32 *aAppType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAppType(aAppType); } \
  575.   NS_IMETHOD SetAppType(PRUint32 aAppType) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAppType(aAppType); } \
  576.   NS_IMETHOD GetAllowAuth(PRBool *aAllowAuth) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowAuth(aAllowAuth); } \
  577.   NS_IMETHOD SetAllowAuth(PRBool aAllowAuth) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowAuth(aAllowAuth); } \
  578.   NS_IMETHOD GetZoom(float *aZoom) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetZoom(aZoom); } \
  579.   NS_IMETHOD SetZoom(float aZoom) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetZoom(aZoom); } \
  580.   NS_IMETHOD GetMarginWidth(PRInt32 *aMarginWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMarginWidth(aMarginWidth); } \
  581.   NS_IMETHOD SetMarginWidth(PRInt32 aMarginWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMarginWidth(aMarginWidth); } \
  582.   NS_IMETHOD GetMarginHeight(PRInt32 *aMarginHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMarginHeight(aMarginHeight); } \
  583.   NS_IMETHOD SetMarginHeight(PRInt32 aMarginHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMarginHeight(aMarginHeight); } \
  584.   NS_IMETHOD GetHasFocus(PRBool *aHasFocus) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHasFocus(aHasFocus); } \
  585.   NS_IMETHOD SetHasFocus(PRBool aHasFocus) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHasFocus(aHasFocus); } \
  586.   NS_IMETHOD GetCanvasHasFocus(PRBool *aCanvasHasFocus) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCanvasHasFocus(aCanvasHasFocus); } \
  587.   NS_IMETHOD SetCanvasHasFocus(PRBool aCanvasHasFocus) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCanvasHasFocus(aCanvasHasFocus); } \
  588.   NS_IMETHOD TabToTreeOwner(PRBool forward, PRBool *tookFocus) { return !_to ? NS_ERROR_NULL_POINTER : _to->TabToTreeOwner(forward, tookFocus); } \
  589.   NS_IMETHOD GetBusyFlags(PRUint32 *aBusyFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBusyFlags(aBusyFlags); } \
  590.   NS_IMETHOD GetLoadType(PRUint32 *aLoadType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLoadType(aLoadType); } \
  591.   NS_IMETHOD SetLoadType(PRUint32 aLoadType) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLoadType(aLoadType); } \
  592.   NS_IMETHOD IsBeingDestroyed(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsBeingDestroyed(_retval); } \
  593.   NS_IMETHOD GetIsExecutingOnLoadHandler(PRBool *aIsExecutingOnLoadHandler) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsExecutingOnLoadHandler(aIsExecutingOnLoadHandler); } \
  594.   NS_IMETHOD GetLayoutHistoryState(nsILayoutHistoryState * *aLayoutHistoryState) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLayoutHistoryState(aLayoutHistoryState); } \
  595.   NS_IMETHOD SetLayoutHistoryState(nsILayoutHistoryState * aLayoutHistoryState) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLayoutHistoryState(aLayoutHistoryState); } \
  596.   NS_IMETHOD GetShouldSaveLayoutState(PRBool *aShouldSaveLayoutState) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetShouldSaveLayoutState(aShouldSaveLayoutState); } \
  597.   NS_IMETHOD GetSecurityUI(nsISecureBrowserUI * *aSecurityUI) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSecurityUI(aSecurityUI); } \
  598.   NS_IMETHOD SetSecurityUI(nsISecureBrowserUI * aSecurityUI) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSecurityUI(aSecurityUI); } \
  599.   NS_IMETHOD SuspendRefreshURIs(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SuspendRefreshURIs(); } \
  600.   NS_IMETHOD ResumeRefreshURIs(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ResumeRefreshURIs(); } \
  601.   NS_IMETHOD BeginRestore(nsIContentViewer *viewer, PRBool top) { return !_to ? NS_ERROR_NULL_POINTER : _to->BeginRestore(viewer, top); } \
  602.   NS_IMETHOD FinishRestore(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->FinishRestore(); } \
  603.   NS_IMETHOD GetRestoringDocument(PRBool *aRestoringDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRestoringDocument(aRestoringDocument); } \
  604.   NS_IMETHOD GetUseErrorPages(PRBool *aUseErrorPages) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUseErrorPages(aUseErrorPages); } \
  605.   NS_IMETHOD SetUseErrorPages(PRBool aUseErrorPages) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUseErrorPages(aUseErrorPages); } \
  606.   NS_IMETHOD GetPreviousTransIndex(PRInt32 *aPreviousTransIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPreviousTransIndex(aPreviousTransIndex); } \
  607.   NS_IMETHOD GetLoadedTransIndex(PRInt32 *aLoadedTransIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLoadedTransIndex(aLoadedTransIndex); } \
  608.   NS_IMETHOD HistoryPurged(PRInt32 numEntries) { return !_to ? NS_ERROR_NULL_POINTER : _to->HistoryPurged(numEntries); } 
  609.  
  610. #if 0
  611. /* Use the code below as a template for the implementation class for this interface. */
  612.  
  613. /* Header file */
  614. class nsDocShell : public nsIDocShell
  615. {
  616. public:
  617.   NS_DECL_ISUPPORTS
  618.   NS_DECL_NSIDOCSHELL
  619.  
  620.   nsDocShell();
  621.  
  622. private:
  623.   ~nsDocShell();
  624.  
  625. protected:
  626.   /* additional members */
  627. };
  628.  
  629. /* Implementation file */
  630. NS_IMPL_ISUPPORTS1(nsDocShell, nsIDocShell)
  631.  
  632. nsDocShell::nsDocShell()
  633. {
  634.   /* member initializers and constructor code */
  635. }
  636.  
  637. nsDocShell::~nsDocShell()
  638. {
  639.   /* destructor code */
  640. }
  641.  
  642. /* [noscript] void loadURI (in nsIURI uri, in nsIDocShellLoadInfo loadInfo, in unsigned long aLoadFlags, in boolean firstParty); */
  643. NS_IMETHODIMP nsDocShell::LoadURI(nsIURI *uri, nsIDocShellLoadInfo *loadInfo, PRUint32 aLoadFlags, PRBool firstParty)
  644. {
  645.     return NS_ERROR_NOT_IMPLEMENTED;
  646. }
  647.  
  648. /* [noscript] void loadStream (in nsIInputStream aStream, in nsIURI aURI, in ACString aContentType, in ACString aContentCharset, in nsIDocShellLoadInfo aLoadInfo); */
  649. NS_IMETHODIMP nsDocShell::LoadStream(nsIInputStream *aStream, nsIURI *aURI, const nsACString & aContentType, const nsACString & aContentCharset, nsIDocShellLoadInfo *aLoadInfo)
  650. {
  651.     return NS_ERROR_NOT_IMPLEMENTED;
  652. }
  653.  
  654. /* [noscript] void internalLoad (in nsIURI aURI, in nsIURI aReferrer, in nsISupports aOwner, in PRUint32 aFlags, in wstring aWindowTarget, in string aTypeHint, in nsIInputStream aPostDataStream, in nsIInputStream aHeadersStream, in unsigned long aLoadFlags, in nsISHEntry aSHEntry, in boolean firstParty, out nsIDocShell aDocShell, out nsIRequest aRequest); */
  655. NS_IMETHODIMP nsDocShell::InternalLoad(nsIURI *aURI, nsIURI *aReferrer, nsISupports *aOwner, PRUint32 aFlags, const PRUnichar *aWindowTarget, const char *aTypeHint, nsIInputStream *aPostDataStream, nsIInputStream *aHeadersStream, PRUint32 aLoadFlags, nsISHEntry *aSHEntry, PRBool firstParty, nsIDocShell **aDocShell, nsIRequest **aRequest)
  656. {
  657.     return NS_ERROR_NOT_IMPLEMENTED;
  658. }
  659.  
  660. /* void createLoadInfo (out nsIDocShellLoadInfo loadInfo); */
  661. NS_IMETHODIMP nsDocShell::CreateLoadInfo(nsIDocShellLoadInfo **loadInfo)
  662. {
  663.     return NS_ERROR_NOT_IMPLEMENTED;
  664. }
  665.  
  666. /* void prepareForNewContentModel (); */
  667. NS_IMETHODIMP nsDocShell::PrepareForNewContentModel()
  668. {
  669.     return NS_ERROR_NOT_IMPLEMENTED;
  670. }
  671.  
  672. /* void setCurrentURI (in nsIURI aURI); */
  673. NS_IMETHODIMP nsDocShell::SetCurrentURI(nsIURI *aURI)
  674. {
  675.     return NS_ERROR_NOT_IMPLEMENTED;
  676. }
  677.  
  678. /* [noscript] void firePageHideNotification (in boolean isUnload); */
  679. NS_IMETHODIMP nsDocShell::FirePageHideNotification(PRBool isUnload)
  680. {
  681.     return NS_ERROR_NOT_IMPLEMENTED;
  682. }
  683.  
  684. /* [noscript] readonly attribute nsPresContext presContext; */
  685. NS_IMETHODIMP nsDocShell::GetPresContext(nsPresContext * *aPresContext)
  686. {
  687.     return NS_ERROR_NOT_IMPLEMENTED;
  688. }
  689.  
  690. /* [noscript] readonly attribute nsIPresShell presShell; */
  691. NS_IMETHODIMP nsDocShell::GetPresShell(nsIPresShell * *aPresShell)
  692. {
  693.     return NS_ERROR_NOT_IMPLEMENTED;
  694. }
  695.  
  696. /* [noscript] readonly attribute nsIPresShell eldestPresShell; */
  697. NS_IMETHODIMP nsDocShell::GetEldestPresShell(nsIPresShell * *aEldestPresShell)
  698. {
  699.     return NS_ERROR_NOT_IMPLEMENTED;
  700. }
  701.  
  702. /* readonly attribute nsIContentViewer contentViewer; */
  703. NS_IMETHODIMP nsDocShell::GetContentViewer(nsIContentViewer * *aContentViewer)
  704. {
  705.     return NS_ERROR_NOT_IMPLEMENTED;
  706. }
  707.  
  708. /* attribute nsIChromeEventHandler chromeEventHandler; */
  709. NS_IMETHODIMP nsDocShell::GetChromeEventHandler(nsIChromeEventHandler * *aChromeEventHandler)
  710. {
  711.     return NS_ERROR_NOT_IMPLEMENTED;
  712. }
  713. NS_IMETHODIMP nsDocShell::SetChromeEventHandler(nsIChromeEventHandler * aChromeEventHandler)
  714. {
  715.     return NS_ERROR_NOT_IMPLEMENTED;
  716. }
  717.  
  718. /* attribute nsIDocumentCharsetInfo documentCharsetInfo; */
  719. NS_IMETHODIMP nsDocShell::GetDocumentCharsetInfo(nsIDocumentCharsetInfo * *aDocumentCharsetInfo)
  720. {
  721.     return NS_ERROR_NOT_IMPLEMENTED;
  722. }
  723. NS_IMETHODIMP nsDocShell::SetDocumentCharsetInfo(nsIDocumentCharsetInfo * aDocumentCharsetInfo)
  724. {
  725.     return NS_ERROR_NOT_IMPLEMENTED;
  726. }
  727.  
  728. /* attribute boolean allowPlugins; */
  729. NS_IMETHODIMP nsDocShell::GetAllowPlugins(PRBool *aAllowPlugins)
  730. {
  731.     return NS_ERROR_NOT_IMPLEMENTED;
  732. }
  733. NS_IMETHODIMP nsDocShell::SetAllowPlugins(PRBool aAllowPlugins)
  734. {
  735.     return NS_ERROR_NOT_IMPLEMENTED;
  736. }
  737.  
  738. /* attribute boolean allowJavascript; */
  739. NS_IMETHODIMP nsDocShell::GetAllowJavascript(PRBool *aAllowJavascript)
  740. {
  741.     return NS_ERROR_NOT_IMPLEMENTED;
  742. }
  743. NS_IMETHODIMP nsDocShell::SetAllowJavascript(PRBool aAllowJavascript)
  744. {
  745.     return NS_ERROR_NOT_IMPLEMENTED;
  746. }
  747.  
  748. /* attribute boolean allowMetaRedirects; */
  749. NS_IMETHODIMP nsDocShell::GetAllowMetaRedirects(PRBool *aAllowMetaRedirects)
  750. {
  751.     return NS_ERROR_NOT_IMPLEMENTED;
  752. }
  753. NS_IMETHODIMP nsDocShell::SetAllowMetaRedirects(PRBool aAllowMetaRedirects)
  754. {
  755.     return NS_ERROR_NOT_IMPLEMENTED;
  756. }
  757.  
  758. /* attribute boolean allowSubframes; */
  759. NS_IMETHODIMP nsDocShell::GetAllowSubframes(PRBool *aAllowSubframes)
  760. {
  761.     return NS_ERROR_NOT_IMPLEMENTED;
  762. }
  763. NS_IMETHODIMP nsDocShell::SetAllowSubframes(PRBool aAllowSubframes)
  764. {
  765.     return NS_ERROR_NOT_IMPLEMENTED;
  766. }
  767.  
  768. /* attribute boolean allowImages; */
  769. NS_IMETHODIMP nsDocShell::GetAllowImages(PRBool *aAllowImages)
  770. {
  771.     return NS_ERROR_NOT_IMPLEMENTED;
  772. }
  773. NS_IMETHODIMP nsDocShell::SetAllowImages(PRBool aAllowImages)
  774. {
  775.     return NS_ERROR_NOT_IMPLEMENTED;
  776. }
  777.  
  778. /* nsISimpleEnumerator getDocShellEnumerator (in long aItemType, in long aDirection); */
  779. NS_IMETHODIMP nsDocShell::GetDocShellEnumerator(PRInt32 aItemType, PRInt32 aDirection, nsISimpleEnumerator **_retval)
  780. {
  781.     return NS_ERROR_NOT_IMPLEMENTED;
  782. }
  783.  
  784. /* attribute unsigned long appType; */
  785. NS_IMETHODIMP nsDocShell::GetAppType(PRUint32 *aAppType)
  786. {
  787.     return NS_ERROR_NOT_IMPLEMENTED;
  788. }
  789. NS_IMETHODIMP nsDocShell::SetAppType(PRUint32 aAppType)
  790. {
  791.     return NS_ERROR_NOT_IMPLEMENTED;
  792. }
  793.  
  794. /* attribute boolean allowAuth; */
  795. NS_IMETHODIMP nsDocShell::GetAllowAuth(PRBool *aAllowAuth)
  796. {
  797.     return NS_ERROR_NOT_IMPLEMENTED;
  798. }
  799. NS_IMETHODIMP nsDocShell::SetAllowAuth(PRBool aAllowAuth)
  800. {
  801.     return NS_ERROR_NOT_IMPLEMENTED;
  802. }
  803.  
  804. /* attribute float zoom; */
  805. NS_IMETHODIMP nsDocShell::GetZoom(float *aZoom)
  806. {
  807.     return NS_ERROR_NOT_IMPLEMENTED;
  808. }
  809. NS_IMETHODIMP nsDocShell::SetZoom(float aZoom)
  810. {
  811.     return NS_ERROR_NOT_IMPLEMENTED;
  812. }
  813.  
  814. /* attribute long marginWidth; */
  815. NS_IMETHODIMP nsDocShell::GetMarginWidth(PRInt32 *aMarginWidth)
  816. {
  817.     return NS_ERROR_NOT_IMPLEMENTED;
  818. }
  819. NS_IMETHODIMP nsDocShell::SetMarginWidth(PRInt32 aMarginWidth)
  820. {
  821.     return NS_ERROR_NOT_IMPLEMENTED;
  822. }
  823.  
  824. /* attribute long marginHeight; */
  825. NS_IMETHODIMP nsDocShell::GetMarginHeight(PRInt32 *aMarginHeight)
  826. {
  827.     return NS_ERROR_NOT_IMPLEMENTED;
  828. }
  829. NS_IMETHODIMP nsDocShell::SetMarginHeight(PRInt32 aMarginHeight)
  830. {
  831.     return NS_ERROR_NOT_IMPLEMENTED;
  832. }
  833.  
  834. /* attribute boolean hasFocus; */
  835. NS_IMETHODIMP nsDocShell::GetHasFocus(PRBool *aHasFocus)
  836. {
  837.     return NS_ERROR_NOT_IMPLEMENTED;
  838. }
  839. NS_IMETHODIMP nsDocShell::SetHasFocus(PRBool aHasFocus)
  840. {
  841.     return NS_ERROR_NOT_IMPLEMENTED;
  842. }
  843.  
  844. /* attribute boolean canvasHasFocus; */
  845. NS_IMETHODIMP nsDocShell::GetCanvasHasFocus(PRBool *aCanvasHasFocus)
  846. {
  847.     return NS_ERROR_NOT_IMPLEMENTED;
  848. }
  849. NS_IMETHODIMP nsDocShell::SetCanvasHasFocus(PRBool aCanvasHasFocus)
  850. {
  851.     return NS_ERROR_NOT_IMPLEMENTED;
  852. }
  853.  
  854. /* void tabToTreeOwner (in boolean forward, out boolean tookFocus); */
  855. NS_IMETHODIMP nsDocShell::TabToTreeOwner(PRBool forward, PRBool *tookFocus)
  856. {
  857.     return NS_ERROR_NOT_IMPLEMENTED;
  858. }
  859.  
  860. /* readonly attribute unsigned long busyFlags; */
  861. NS_IMETHODIMP nsDocShell::GetBusyFlags(PRUint32 *aBusyFlags)
  862. {
  863.     return NS_ERROR_NOT_IMPLEMENTED;
  864. }
  865.  
  866. /* attribute unsigned long loadType; */
  867. NS_IMETHODIMP nsDocShell::GetLoadType(PRUint32 *aLoadType)
  868. {
  869.     return NS_ERROR_NOT_IMPLEMENTED;
  870. }
  871. NS_IMETHODIMP nsDocShell::SetLoadType(PRUint32 aLoadType)
  872. {
  873.     return NS_ERROR_NOT_IMPLEMENTED;
  874. }
  875.  
  876. /* boolean isBeingDestroyed (); */
  877. NS_IMETHODIMP nsDocShell::IsBeingDestroyed(PRBool *_retval)
  878. {
  879.     return NS_ERROR_NOT_IMPLEMENTED;
  880. }
  881.  
  882. /* readonly attribute boolean isExecutingOnLoadHandler; */
  883. NS_IMETHODIMP nsDocShell::GetIsExecutingOnLoadHandler(PRBool *aIsExecutingOnLoadHandler)
  884. {
  885.     return NS_ERROR_NOT_IMPLEMENTED;
  886. }
  887.  
  888. /* attribute nsILayoutHistoryState layoutHistoryState; */
  889. NS_IMETHODIMP nsDocShell::GetLayoutHistoryState(nsILayoutHistoryState * *aLayoutHistoryState)
  890. {
  891.     return NS_ERROR_NOT_IMPLEMENTED;
  892. }
  893. NS_IMETHODIMP nsDocShell::SetLayoutHistoryState(nsILayoutHistoryState * aLayoutHistoryState)
  894. {
  895.     return NS_ERROR_NOT_IMPLEMENTED;
  896. }
  897.  
  898. /* readonly attribute boolean shouldSaveLayoutState; */
  899. NS_IMETHODIMP nsDocShell::GetShouldSaveLayoutState(PRBool *aShouldSaveLayoutState)
  900. {
  901.     return NS_ERROR_NOT_IMPLEMENTED;
  902. }
  903.  
  904. /* attribute nsISecureBrowserUI securityUI; */
  905. NS_IMETHODIMP nsDocShell::GetSecurityUI(nsISecureBrowserUI * *aSecurityUI)
  906. {
  907.     return NS_ERROR_NOT_IMPLEMENTED;
  908. }
  909. NS_IMETHODIMP nsDocShell::SetSecurityUI(nsISecureBrowserUI * aSecurityUI)
  910. {
  911.     return NS_ERROR_NOT_IMPLEMENTED;
  912. }
  913.  
  914. /* void suspendRefreshURIs (); */
  915. NS_IMETHODIMP nsDocShell::SuspendRefreshURIs()
  916. {
  917.     return NS_ERROR_NOT_IMPLEMENTED;
  918. }
  919.  
  920. /* void resumeRefreshURIs (); */
  921. NS_IMETHODIMP nsDocShell::ResumeRefreshURIs()
  922. {
  923.     return NS_ERROR_NOT_IMPLEMENTED;
  924. }
  925.  
  926. /* void beginRestore (in nsIContentViewer viewer, in boolean top); */
  927. NS_IMETHODIMP nsDocShell::BeginRestore(nsIContentViewer *viewer, PRBool top)
  928. {
  929.     return NS_ERROR_NOT_IMPLEMENTED;
  930. }
  931.  
  932. /* void finishRestore (); */
  933. NS_IMETHODIMP nsDocShell::FinishRestore()
  934. {
  935.     return NS_ERROR_NOT_IMPLEMENTED;
  936. }
  937.  
  938. /* readonly attribute boolean restoringDocument; */
  939. NS_IMETHODIMP nsDocShell::GetRestoringDocument(PRBool *aRestoringDocument)
  940. {
  941.     return NS_ERROR_NOT_IMPLEMENTED;
  942. }
  943.  
  944. /* attribute boolean useErrorPages; */
  945. NS_IMETHODIMP nsDocShell::GetUseErrorPages(PRBool *aUseErrorPages)
  946. {
  947.     return NS_ERROR_NOT_IMPLEMENTED;
  948. }
  949. NS_IMETHODIMP nsDocShell::SetUseErrorPages(PRBool aUseErrorPages)
  950. {
  951.     return NS_ERROR_NOT_IMPLEMENTED;
  952. }
  953.  
  954. /* readonly attribute long previousTransIndex; */
  955. NS_IMETHODIMP nsDocShell::GetPreviousTransIndex(PRInt32 *aPreviousTransIndex)
  956. {
  957.     return NS_ERROR_NOT_IMPLEMENTED;
  958. }
  959.  
  960. /* readonly attribute long loadedTransIndex; */
  961. NS_IMETHODIMP nsDocShell::GetLoadedTransIndex(PRInt32 *aLoadedTransIndex)
  962. {
  963.     return NS_ERROR_NOT_IMPLEMENTED;
  964. }
  965.  
  966. /* void historyPurged (in long numEntries); */
  967. NS_IMETHODIMP nsDocShell::HistoryPurged(PRInt32 numEntries)
  968. {
  969.     return NS_ERROR_NOT_IMPLEMENTED;
  970. }
  971.  
  972. /* End of implementation class template. */
  973. #endif
  974.  
  975.  
  976. #endif /* __gen_nsIDocShell_h__ */
  977.